﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MovingRobot
{
    public class Field
    {
        public int Wight { get; set; }
        public int Height { get; set; }

        public Field()
        {
            this.Wight = 10;
            this.Height = 10;
        }

        public Field(int wight, int height)
        {
            this.Wight = wight;
            this.Height = height;
        }

        public void Rend()
        {
            int x = 0;
            int y = 0;
            x++;
            while (x < this.Wight)                         // top side
            {
                Console.SetCursorPosition(x,y);
                Console.Write('-');
                x++;
            }
            y++;
            while (y < this.Height)                        //right side
            {
                Console.SetCursorPosition(x, y);
                Console.Write('|');
                y++;
            }
            x--;
            while (x > 0)                                //bot side
            {
                Console.SetCursorPosition(x, y);
                Console.Write('-');
                x--;
            }
            y--;
            while (y > 0)                                   //left side
            {
                Console.SetCursorPosition(x, y);
                Console.Write('|');
                y--;
                
            }

        }
           
    }
}
